package com.kelvin.paopao.injector.modules;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.kelvin.paopao.adapter.MainFindAdapter;
import com.kelvin.paopao.adapter.MainFindAdapter2;
import com.kelvin.paopao.injector.PerFragment;
import com.kelvin.paopao.module.main.find.find.MainFindFragment;
import com.kelvin.paopao.module.main.find.list.MainFindListFragment;
import com.kelvin.paopao.module.main.find.list.MainFindListPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by Administrator on 2017/5/7.
 */

@Module
public class MainFindListModule {
    private final MainFindListFragment mView;

    public MainFindListModule(MainFindListFragment view) {
        mView = view;
    }

    @PerFragment
    @Provides
    public MainFindListPresenter providePresenter() {
        return new MainFindListPresenter(mView);
    }

    @PerFragment
    @Provides
    public BaseQuickAdapter provideAdapter() {
        return new MainFindAdapter2(mView.getContext());
    }
}
